﻿using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;

namespace ProjScan.Config
{
	// Token: 0x02000334 RID: 820
	internal class ScenesCheckConfig : BaseConfig
	{
		// Token: 0x06001307 RID: 4871 RVA: 0x0005B270 File Offset: 0x00059470
		public override void Init()
		{
			this.hasSeparateTargetDirSettings = false;
			this.hasWhiteList = false;
			this.hasfailedData = true;
			this.hasFixRule = true;
			bool flag = this.dicRuleConfig == null;
			if (flag)
			{
				this.dicRuleConfig = new Dictionary<string, RuleConfig>();
			}
			else
			{
				this.dicRuleConfig.Clear();
			}
		}

		// Token: 0x06001308 RID: 4872 RVA: 0x0005B494 File Offset: 0x00059694
		public override void LoadConfig(JObject data)
		{
			this._rootConfig = (JObject)data["Scenes_Check"];
			this.scenesCheckModeConfig = (JValue)this._rootConfig["Scene_Check_Mode"];
			bool flag = Extensions.Value<string>(this.scenesCheckModeConfig).ToLower() == "buildonly";
			if (flag)
			{
				this.sceneCheckMode = ScenesCheckConfig.e_Scene_Check_Mode.BuildOnly;
			}
			this.ResolveRule();
		}

		// Token: 0x06001309 RID: 4873 RVA: 0x0005B504 File Offset: 0x00059704
		public override void SaveConfig(JObject data)
		{
			JObject jobject = this.SaveJObjectRule();
			jobject.Add("Scene_Check_Mode", this.sceneCheckMode.ToString());
			data.Add("Scenes_Check", jobject);
		}

		// Token: 0x04000B69 RID: 2921
		private JValue scenesCheckModeConfig = null;

		// Token: 0x04000B6A RID: 2922
		public ScenesCheckConfig.e_Scene_Check_Mode sceneCheckMode = ScenesCheckConfig.e_Scene_Check_Mode.All;

		// Token: 0x02000335 RID: 821
		public enum e_Scene_Check_Mode
		{
			// Token: 0x04000B6C RID: 2924
			All,
			// Token: 0x04000B6D RID: 2925
			BuildOnly
		}
	}
}
